{% extends 'generic/object.html' %}
{% load helpers %}
{% load plugins %}
{% load i18n %}

{% block content %}
  <div class="row">
    <div class="col col-12 col-md-6">
      <div class="card">
        <h2 class="card-header">{% trans "IPSec Policy" %}</h2>
        <table class="table table-hover attr-table">
          <tr>
            <th scope="row">{% trans "Name" %}</th>
            <td>{{ object.name }}</td>
          </tr>
          <tr>
            <th scope="row">{% trans "Description" %}</th>
            <td>{{ object.description|placeholder }}</td>
          </tr>
          <tr>
            <th scope="row">{% trans "PFS group" %}</th>
            <td>{{ object.get_pfs_group_display|placeholder }}</td>
          </tr>
          <tr>
            <th scope="row">{% trans "IPSec Profiles" %}</th>
            <td>
              <a href="{% url 'vpn:ipsecprofile_list' %}?ipsec_policy_id={{ object.pk }}">{{ object.ipsec_profiles.count }}</a>
            </td>
          </tr>
        </table>
      </div>
      {% plugin_left_page object %}
    </div>
    <div class="col col-12 col-md-6">
      {% include 'inc/panels/custom_fields.html' %}
      {% include 'inc/panels/comments.html' %}
      {% include 'inc/panels/tags.html' %}
      {% plugin_right_page object %}
    </div>
  </div>
  <div class="row">
    <div class="col col-md-12">
    <div class="col col-md-12">
      <div class="card">
        <h2 class="card-header">{% trans "Proposals" %}</h2>
        {% htmx_table 'vpn:ipsecproposal_list' ipsec_policy_id=object.pk %}
      </div>
      {% plugin_full_width_page object %}
    </div>
  </div>
{% endblock %}
